package com.david.videoapp

import android.app.Application
import android.app.UiModeManager
import android.content.res.Configuration
import com.david.core.utils.PreferenceUtils

class VideoApplication :Application(){
    var isTv = false
    companion object{
        lateinit var instance:VideoApplication

        fun getApp():VideoApplication{
            return instance
        }
    }
    override fun onCreate() {
        super.onCreate()
        instance = this


        val uiModeManager = getSystemService(UI_MODE_SERVICE) as UiModeManager
        if (uiModeManager.currentModeType == Configuration.UI_MODE_TYPE_TELEVISION) {
            isTv = true
        }


        PreferenceUtils.context = this
        PreferenceUtils.getInstance()
    }


}